package com.foreknow.demo7;

public class OverloadDemo1 {
    private int id;
    private String name;

    public OverloadDemo1() {

    }

    public OverloadDemo1(int id) {
        this.id = id;
    }

    public OverloadDemo1(int id, String name) {
            this.id = id;
        this.name = name;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static void main(String[] args) {
        OverloadDemo1 demo1 = new OverloadDemo1();
        demo1.setId(100);
        demo1.setName("fender");
        System.out.println(demo1.getId());
        System.out.println(demo1.getName());
    }

}
